<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
    <meta content="" name="description"/>
    <meta content="" name="author"/>
    <meta name="MobileOptimized" content="320"/>
    <link href="../../resources/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/style.css" rel="stylesheet" type="text/css"/>
    <link href="../../resources/css/style-metronic.css" rel="stylesheet" type="text/css"/>

    <script src="../../resources/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script src="../../resources/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        // <![CDATA[
        function trim(arg){
            var reSpace=/^\s*(.*?)\s*$/;
            return arg.replace(reSpace,"$1");
        };
        function pNews(){
            var title = $('#title').val();
            var name = $('#name').val();
            var message = $('#message').val();
            if (trim(title)==""|| trim(name)=="" ||trim( message)=="") {
                alert("输入项不能为空！请重新输入");
                return false;
            }
            return true;
        }
        // ]]>
    </script>

    <style>
        .makeNotice {
            margin-top: 40px;
        }

        .noticeLabel {
            margin-left: 100px;
            margin-bottom: 15px;
        }

        .makeText {
            width: 60%;
            height: 400px
        }

        .makeSubmit {
            margin-top: 30px;
            display: inline-block;
            background: #000;
            color: #FFF;
            font-size: 13px;
            line-height: 22px;
            border: none;
            float: right;
            margin-right: 240px
        }
    </style>


</head>
<body>
<h3 class="page-title" style="margin-top:22px">
    发布
    <small>公告</small>
</h3>
<hr />
<div class="makeNotice">
    <form action="/manage/publishNews" method="post" name="makeNotice" onsubmit="return pNews()">

        <label class="noticeLabel">主&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;题：</label><input id="title" class="makeTopic"
                                                                                               type="text"
                                                                                               name="title"/><br />
        <label class="noticeLabel">发布人员：</label><input  id="name" class="makeTopic" disabled="true" type="text" name="name" th:value="${session.currentUser.name}"/><br />
        <label class="noticeLabel">详&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;情：</label><textarea id="message" class="makeText"
                                                                                                  type="text"
                                                                                                  name="message"></textarea><br />
        <input id="publishNews" class="makeSubmit" type="submit" name="topic" value="提交"/>

    </form>

</div>

</body>

</html>
